<%@ page language="java" pageEncoding="utf-8" isELIgnored="false" import="java.util.*,com.demo.entity.User"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
String baseUrl = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/";
%>
<!DOCTYPE html>
<html>
<base href="<%=baseUrl%>"/>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="static_front/css/bootstrap.min.css">
<title></title>
<style>
</style>
<body>

<h6>评论列表页面</h6>
<div class="container border">
	<div class="row">
		<div class="col-md-8">
			<table class="table">
				  <thead>
				    <tr>
				      <th scope="col">标题</th>
				      <th scope="col">内容</th>
				      <th scope="col">时间</th>
				      <th scope="col">发表人</th>
				    </tr>
				  </thead>
				  <tbody>
				  	<c:forEach items="${requestScope.comments}" var="c">
				    <tr>
				      <th scope="row">${c.title}</th>
				      <td>${c.content}</td>
				      <td><fmt:formatDate value="${c.created}"/></td>
				      <td>@${c.nickname}</td>
				    </tr>
				    </c:forEach>		    
				  </tbody>
				</table>
		</div>
	</div>	
</div>

<script type="text/javascript" src="static_front/js/jquery.min.js"></script>
<script type="text/javascript" src="static_front/js/bootstrap.min.js"></script>
</body>
</html>
